<?php
/**
 * <https://y.st./>
 * Copyright © 2017 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Stupid Thunderbird ...',
	'<{body}>' => <<<END
<section id="general">
	<h2>General news</h2>
	<p>
		Thunderbird drives me absolutely bonkers for a number of reasons.
		However, I continue using it because it&apos;s the only email client in which $a[Tor] can be used without $a[DNS] leaks that I know of.
		That said, a plugin called TorBirdy is required for that, and TorBirdy frequently disables itself while allowing traffic to continue flowing.
		In other words, there are $a[DNS] leaks <strong>*anyway*</strong>.
		So why am I using Thunderbird again?
	</p>
	<p>
		Anyway, one of the many terrible things about Thunderbird is that it doesn&apos;t allow you to set the date format it uses.
		At all.
		It insists on reading the operating system&apos;s localisation settings and using those for date formatting.
		There&apos;s no way to override this and set your own date format.
		This has been bothering me for as long as I&apos;ve been using Thunderbird, which has been at least a couple years.
		Every time I look into messing with the localisation settings of the operating system, I run into the fact that doing so is an ugly, complicated mess.
		Today, I was finally so bothered with Thunderbird that I slowly pushed myself through the process of getting this done.
	</p>
	<p>
		First, I learned that you need to set up your own local files (or modify existing ones), which are owned by the system.
		In other words, to simply specify a date format to display email arrival times in Thunderbird, one <strong>*has to have root access on their machine*</strong>.
		General purpose computers are multi-user systems, and you have to go get the freaking <strong>*administrator*</strong> of your machine to set up some obtuse files at a <strong>*system level*</strong>, just so you, <strong>*one user*</strong>, can have dates displayed in your preferred format for your and only your instance of Thunderbird.
		I&apos;m doing this on my own laptop, so I&apos;m obviously the administrator and don&apos;t need to get someone else to do it for me, but that&apos;s not the case for everyone using Thunderbird, for example, on their work computers using their work email accounts.
		I used <a href="https://ccollins.wordpress.com/2009/01/06/how-to-change-date-formats-on-ubuntu/">some instructions I found</a> for setting up the required files.
	</p>
	<p>
		Next, I found that Thunderbird appeared to be ignoring the <code>LC_TIME</code> variable I&apos;d finally gotten working everywhere else.
		Eventually with lots of testing, I found that Thunderbird simply isn&apos;t receiving the proper contents of this variable.
		If I opened up the command prompt and called Thunderbird from there, Thunderbird got the date formats correct.
		If I opened Thunderbird from the menu, it didn&apos;t.
		I had to set up a bash script to export the variable (because apparently exporting it from <code>~/.bash_aliases</code>, <code>~/.bashrc</code>, <strong>*and*</strong> <code>~/.profile</code> wasn&apos;t good enough), and that worked.
		This bash script was required though because it doesn&apos;t seem to be possible to run multiple commands from a <code>.desktop</code> file.
		It&apos;s very inconvenient.
		I tried a bunch of things, and I ended up breaking something.
		I&apos;m not sure what I did, but I did it on the system level.
		Thunderbird stopped reading <code>LC_TIME</code> at all, claiming that the locale I&apos;d built had become incompatible with a C library or something.
		No other locales were working either.
		Joy.
		Again, this is a <strong>*very*</strong> good reason why you shouldn&apos;t need to mess with <code>*system*</code> files to set a basic date display format in an application!
		Messing with system files, you can <strong>*break*</strong> stuff!
		I spent <strong>*hours*</strong> trying to get the system back to somewhere sane.
		I don&apos;t know what I did to fix it either, but everything seems to be fine now, aside from the fact that the system is still passing the wrong value of <code>LC_TIME</code> if I try to call Thunderbird directly from the <code>.desktop</code> file.
		Also, when I inevitably upgrade my system or switch to a new computer, I&apos;m going to need to go through a lot of this nonsense again, because it&apos;s not confined to my home directory like a normal application setting would be.
	</p>
	<p>
		Long story short, I&apos;m incredibly annoyed with Thunderbird&apos;s exceedingly-poor lack of basic sanity, and my system&apos;s doing something strange that only makes it worse.
		Is it the operating system (Debian) doing it?
		Is it the desktop ($a[LXDE]) doing it?
		I don&apos;t even know.
	</p>
</section>
<section id="university">
	<h2>University life</h2>
	<p>
		I wasn&apos;t as productive today as I&apos;d like to have been, but I did get a fair amount of my coursework done.
	</p>
</section>
END
);
